package com.skhu.as.mapper;

import java.sql.ResultSet;
import java.sql.SQLException;

import org.springframework.jdbc.core.RowMapper;

import com.skhu.as.domain.FaultHandlingDomain;

public class FaultHandlingDomainM implements RowMapper {

	@Override
	public Object mapRow(ResultSet rs, int rowNum) throws SQLException {
		
		FaultHandlingDomain fd = new FaultHandlingDomain();
		
		fd.setFaultHandlingNo(rs.getInt("fault_handling_no"));
		fd.setDutyHoursNo(rs.getInt("duty_hours_no"));
		fd.setDutyHours(rs.getString("duty_hours"));
		fd.setFirstWorkerNo(rs.getInt("first_worker_no"));
		fd.setFirstWorkerContactNumber(rs.getString("first_worker_contact_number"));
		fd.setFirstWorkerMajor(rs.getString("first_worker_major"));
		fd.setFirstWorkerName(rs.getString("first_worker_name"));
		fd.setProcessDate(rs.getString("process_date"));
		fd.setProcessingInformation(rs.getString("processing_information"));
		fd.setProcessStatusNo(rs.getInt("process_status_no"));
		fd.setProcessStatus(rs.getString("process_status"));
		fd.setReceiptDate(rs.getString("receipt_date"));
		fd.setReceptionistNo(rs.getInt("receptionist_no"));
		fd.setReceptionistContactNumber(rs.getString("receptionist_contact_number"));
		fd.setReceptionistMajor(rs.getString("receptionist_major"));
		fd.setReceptionistName(rs.getString("receptionist_name"));
		fd.setRequestContent(rs.getString("request_content"));
		fd.setRequesterNo(rs.getInt("requester_no"));
		fd.setRequesterContactNumber(rs.getString("requester_contact_number"));
		fd.setRequesterDepartment(rs.getString("requester_department"));
		fd.setRequesterName(rs.getString("requester_name"));
		fd.setRequestPlace(rs.getString("request_place"));
		fd.setRequestTypeNo(rs.getInt("request_type_no"));
		fd.setRequestType(rs.getString("request_type"));
		
		return fd;
	}
	
}
